Skip to content

Paginate results from server #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 27, 2025
Merged

Paginate results from server #762

merged 7 commits into from
Mar 27, 2025

Conversation

kzscisoft
Copy link
Collaborator

@kzscisoft kzscisoft commented Mar 9, 2025

Paginate Server Response

Issue: #761

Python Version(s) Tested: 3.13

Operating System(s): Windows 11

Documentation PR: N/A

📝 Summary

Currently when making a GET request to the server the user is able to ask for all results in one query, this means it can take some time to get a response because the server has to run a large database query. This is very inefficient for larger databases. This feature paginates the request.

🔄 Changes

Add a middle function which turns a GET request into a series of requests for 100 entries at a time incrementing the start index. This way the server is able to handle the request more quickly.

✔️ Checklist

  • Unit and integration tests passing.
  • Pre-commit hooks passing.
  • Quality checks passing.
  • Updated the documentation.

@kzscisoft kzscisoft added enhancement New feature or request improvement labels Mar 9, 2025
@kzscisoft kzscisoft added this to the v2.1.0-rc1 milestone Mar 9, 2025
@kzscisoft kzscisoft linked an issue Mar 9, 2025 that may be closed by this pull request
@kzscisoft kzscisoft marked this pull request as ready for review March 10, 2025 10:46
@kzscisoft kzscisoft requested a review from wk9874 March 10, 2025 10:46
@wk9874 wk9874 assigned kzscisoft and unassigned wk9874 Mar 17, 2025
@kzscisoft kzscisoft marked this pull request as draft March 25, 2025 09:33
@kzscisoft kzscisoft marked this pull request as ready for review March 25, 2025 11:44
@kzscisoft kzscisoft linked an issue Mar 26, 2025 that may be closed by this pull request
@wk9874
Copy link
Collaborator

wk9874 commented Mar 27, 2025

lgtm!

@wk9874 wk9874 merged commit 02bbc23 into dev Mar 27, 2025
11 of 13 checks passed
@kzscisoft kzscisoft deleted the feature/pagination branch May 12, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Paginate Results from Server Fix Generators to instead use pagination
2 participants